package com.joseph.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.joseph.base.BaseDto;
import com.joseph.base.BaseService;
import com.joseph.dao.UserDao;
import com.joseph.model.User;

/**
 * @description 
 * @author Joseph_Mok
 * @date 2016年1月21日下午6:05:26
 */

@Service
public class UserService extends BaseService <User>{

	@Resource
	private UserDao userDao;

	@Override
	public List <User> findAll() {
		return userDao.getAll();
	}

	@Override
	public User findById(Long id) {
		return userDao.getById(id);
	}

	public User getByUsername(String username) {
		return userDao.getByUsername(username);
	}
	
	public User getByNameAndPass(BaseDto dto) {
		return userDao.getByNameAndPass(dto);
	}
}
